package com.asset.dispoal.business.bsCase.service.commom;

import com.asset.dispoal.business.bsCase.domain.db.mapper.BsCaseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.mhuang.pacebox.core.ddd.BaseCommand;
import tech.mhuang.pacebox.springboot.protocol.Result;

/**
 * @author qr
 * @date 2022/4/12$
 */
@Component
public class CaseStaticsticsCommand implements BaseCommand<String, Result> {


    @Autowired
    BsCaseMapper bsCaseMapper;

    @Override
    public Result execute(String code) {
        return Result.ok(bsCaseMapper.queryStatisticsByCode(code));
    }
}
